package com.baibei.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * Created by shenminjie on 2017/12/15.
 * mail:shenminjie@100bei.com
 */

public class BaseParam implements Serializable, Parcelable {
    private String accessToken;
    private String refreshToken;
    private String appKey;
    private String appSecret;
    private String exchange;
    private String memberChannel;
    private String deviceId;
    private String version;

    @Override
    public String toString() {
        return "BaseParam{" +
                "accessToken='" + accessToken + '\'' +
                ", refreshToken='" + refreshToken + '\'' +
                ", appKey='" + appKey + '\'' +
                ", appSecret='" + appSecret + '\'' +
                ", exchange='" + exchange + '\'' +
                ", memberChannel='" + memberChannel + '\'' +
                ", deviceId='" + deviceId + '\'' +
                ", version='" + version + '\'' +
                '}';
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public String getRefreshToken() {
        return refreshToken;
    }

    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public String getExchange() {
        return exchange;
    }

    public void setExchange(String exchange) {
        this.exchange = exchange;
    }

    public String getMemberChannel() {
        return memberChannel;
    }

    public void setMemberChannel(String memberChannel) {
        this.memberChannel = memberChannel;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public BaseParam() {
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.accessToken);
        dest.writeString(this.refreshToken);
        dest.writeString(this.appKey);
        dest.writeString(this.appSecret);
        dest.writeString(this.exchange);
        dest.writeString(this.memberChannel);
        dest.writeString(this.deviceId);
        dest.writeString(this.version);
    }

    protected BaseParam(Parcel in) {
        this.accessToken = in.readString();
        this.refreshToken = in.readString();
        this.appKey = in.readString();
        this.appSecret = in.readString();
        this.exchange = in.readString();
        this.memberChannel = in.readString();
        this.deviceId = in.readString();
        this.version = in.readString();
    }

    public static final Creator<BaseParam> CREATOR = new Creator<BaseParam>() {
        @Override
        public BaseParam createFromParcel(Parcel source) {
            return new BaseParam(source);
        }

        @Override
        public BaseParam[] newArray(int size) {
            return new BaseParam[size];
        }
    };
}
